package cn.bobohost.crmrbac.pojo.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author 波波老师
 * @since 2025-05-21
 */
@Getter
@Setter
@TableName("employee")
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("name")
    private String name;

    private String username;

    @TableField("password")
    private String password;

    @TableField("email")
    private String email;

    @TableField("age")
    private Integer age;

    @TableField("admin")
    private Boolean admin;

    @TableField("dept_id")
    private Long deptId;

    //添加注解，mybatisplus中屏蔽数据库表字段映射的注解
    @TableField(exist = false)
    private List<Role> roles = new ArrayList<>();
}
